﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Master/Admin.Master" AutoEventWireup="true"
    CodeBehind="HotelsList.aspx.cs" Inherits="Besture.UI.HotelsList" %>

<%@ Import Namespace="Besture.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <div class="listPage">
        <!--顶部操作按钮开始-->
		<div class="operateBar">
			<ul>
				<li><a href="javascript:grid.SelectRows();" class="operate-all"><s class="icon-gou-red"></s>全选</a></li>
				<li><a href="javascript:grid.UnselectRows();"  class="operate-cancel"><s class="icon-cancel-yellow"></s>
					取消</a></li>
				<li>
					<asp:LinkButton ID="lbAllDelete" runat="server" OnClientClick="return confirm('删除后无法恢复，确定删除选中项吗?');"
						class="operate-delete" OnClick="lbDel_Click"><s class="icon-delete"></s>删除</asp:LinkButton>
				</li>
				<li>
					<asp:LinkButton ID="lbAdd" runat="server" class="operate-add" OnClick="lbAdd_Click"><s class="icon-add-green"></s>添加</asp:LinkButton>
				</li>
			</ul>
        </div>
        <!--顶部操作按钮结束-->
        <cms:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" Width="99%"
            AutoGenerateColumns="False" KeyFieldName="ID" OnCustomCallback="GridCustomCallback"
            OnRowDeleting="GridRowDeleting">
            <Columns>
                <cms:GridViewCommandColumn ShowSelectCheckbox="true" VisibleIndex="0" Width="50px"
                    FixedStyle="Left">
                    <HeaderTemplate>
                        <input type="checkbox" onclick="grid.SelectAllRowsOnPage(this.checked);" title="全选/全不选"
                            id="chkAll" runat="server" />
                    </HeaderTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                </cms:GridViewCommandColumn>
				<cms:GridViewDataTextColumn Caption="操作" VisibleIndex="2" Width="120px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FixedStyle="Left">
                    <DataItemTemplate>
						<div class="operateBox">
                            <a class="btn-text-edit" href="HotelsSet.aspx?id=<%# Eval("ID")%>" title="编辑">
                            </a>&nbsp;&nbsp;<a class="btn-text-del" onclick="window.setTimeout(function(){aspxGVDeleteRow('ctl00_Content_grid',<%# Container.ItemIndex %>);},0)"
                                title="删除"></a>
                        </div>
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="酒店名称" VisibleIndex="3" Width="" HeaderStyle-HorizontalAlign="Center" 
					CellStyle-HorizontalAlign="Center" FieldName="HotelsName">
					<Settings AutoFilterCondition="Contains"></Settings>
				</cms:GridViewDataTextColumn>
				<cms:GridViewDataTextColumn Caption="酒店图片" VisibleIndex="4" Width="100" HeaderStyle-HorizontalAlign="Center" 
					CellStyle-HorizontalAlign="Center" >
					<DataItemTemplate>
						<img src="<%# Constants.PATH_IMAGE_CONTENT+Eval("HotelsImage") %>" width="80" height="60" />
					</DataItemTemplate>
				</cms:GridViewDataTextColumn>
				<cms:GridViewDataTextColumn Caption="地区位置" VisibleIndex="11" Width="" HeaderStyle-HorizontalAlign="Center" 
					CellStyle-HorizontalAlign="Center" FieldName="AreaName">
					<Settings AutoFilterCondition="Contains"></Settings>
				</cms:GridViewDataTextColumn>
				<cms:GridViewDataTextColumn Caption="酒店星级" VisibleIndex="12" Width="" HeaderStyle-HorizontalAlign="Center" 
					CellStyle-HorizontalAlign="Center" FieldName="HotelsStarsName">
					<Settings AutoFilterCondition="Contains"></Settings>
				</cms:GridViewDataTextColumn>
				<cms:GridViewDataTextColumn Caption="酒店特色" VisibleIndex="13" Width="" HeaderStyle-HorizontalAlign="Center" 
					CellStyle-HorizontalAlign="Center" FieldName="CharacteristicIDName">
					<Settings AutoFilterCondition="Contains"></Settings>
				</cms:GridViewDataTextColumn>
				<cms:GridViewDataTextColumn Caption="酒店品牌" VisibleIndex="14" Width="" HeaderStyle-HorizontalAlign="Center" 
					CellStyle-HorizontalAlign="Center" FieldName="BrandIDName">
					<Settings AutoFilterCondition="Contains"></Settings>
				</cms:GridViewDataTextColumn>
				<cms:GridViewDataTextColumn Caption="排序编号" VisibleIndex="22" Width="" HeaderStyle-HorizontalAlign="Center" 
					CellStyle-HorizontalAlign="Center" FieldName="SortID">
					<Settings AutoFilterCondition="Contains"></Settings>
				</cms:GridViewDataTextColumn>
				<cms:GridViewDataDateColumn Caption="创建时间" VisibleIndex="23" Width="" HeaderStyle-HorizontalAlign="Center" 
					CellStyle-HorizontalAlign="Center"> 
                          <DataItemTemplate>
				        <%#Convert.ToDateTime(Eval("CreateTime")).ToString("yyyy-MM-dd HH:mm:ss") %>
				    </DataItemTemplate>
				</cms:GridViewDataDateColumn>
				
            </Columns>
        </cms:ASPxGridView>
    </div>
</asp:Content>
